#ifndef MYMEMORY_H
#define MYMEMORY_H


#include "moduleinfo.h"
#include "types.h"
#include "translatorinterface.h"
#include <QtCore/QObject>

class MyMemory : public QObject, TranslatorInterface
{
public:
    MyMemory();
    ~MyMemory();

    LanguageDirectionList *getDirections() const {
        return LanguageDirectionList();
    }

    bool translate(const QString &src_lang,
                   const QString &dest_lang,
                   const QString &text);

    QStringList getCodes()      const;
    QStringList getNames()      const;
    QStringList getIconCodes()  const;

    QString errorString() const;
    TranslatorError error() const;

    bool isRemoteTranslator() const;
    bool isFixedDirections()  const;


    ModuleInfo *getModuleInfo() const {
        return &m_info;
    }
private:
    ModuleInfo m_info;
    QString m_error_string;
    TranslatorError m_error;


    static const bool
    m_is_remote,
    m_is_fixed;
};

#endif // MYMEMORY_H
